package com.member.shop.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.member.shop.domain.SysBizRecharge;
import com.member.shop.domain.SysBizRechargeUser;
import com.member.shop.dto.RechargeSurplusDto;
import com.member.shop.dto.RechargeSurplusPayDto;
import com.member.shop.vo.RechargePayVo;
import com.member.shop.vo.SurplusVo;

/**
 * 充值配置Service接口
 *
 * @author lixinchen
 * @date 2024-05-08
 */
public interface ISysBizRechargeService extends IService<SysBizRecharge> {
    /**
     * 查询充值配置
     *
     * @param id 充值配置主键
     * @return 充值配置
     */
    public SysBizRecharge selectSysBizRechargeById(Long id);

    /**
     * 查询充值配置列表
     *
     * @param queryWrapper 充值配置
     * @return 充值配置集合
     */
    public List<SysBizRecharge> selectSysBizRechargeList(LambdaQueryWrapper<SysBizRecharge> queryWrapper);

    /**
     * 查询充值配置列表
     *
     * @param sysBizRecharge 充值配置
     * @return 充值配置集合
     */
    public List<SysBizRecharge> selectSysBizRechargeList(SysBizRecharge sysBizRecharge);

    /**
     * 新增充值配置
     *
     * @param sysBizRecharge 充值配置
     * @return 结果
     */
    public int insertSysBizRecharge(SysBizRecharge sysBizRecharge);

    /**
     * 修改充值配置
     *
     * @param sysBizRecharge 充值配置
     * @return 结果
     */
    public int updateSysBizRecharge(SysBizRecharge sysBizRecharge);

    /**
     * 批量删除充值配置
     *
     * @param ids 需要删除的充值配置主键集合
     * @return 结果
     */
    public int deleteSysBizRechargeByIds(Long[] ids);

    /**
     * 删除充值配置信息
     *
     * @param id 充值配置主键
     * @return 结果
     */
    public int deleteSysBizRechargeById(Long id);

    SurplusVo querySurplus(Long userId, Long tenantId);

    SysBizRechargeUser rechargeSurplus(RechargeSurplusDto rechargeSurplusDto, Long userId) throws WxPayException;

    RechargePayVo paymentRecharge(RechargeSurplusPayDto rechargeSurplusPayDto) throws WxPayException;
}
